<template>
	<page-card title="请假审批操作">
		<div class="table-page-search-wrapper">
			<a-row type="flex"
						 justify="center">
				<a-col style="font-size:18px;font-weight:800;margin:20px;">
					重庆市公安局党委成员外出请假审批表
				</a-col>
			</a-row>
			<a-row type="flex"
						 justify="center">
				<a-col :span="3"
							 class="front">
					姓名
				</a-col>
				<a-col :span="4"
							 class="front">
					张三
				</a-col>
				<a-col :span="2"
							 class="value">
					性别
				</a-col>
				<a-col :span="3"
							 class="front">
					男
				</a-col>
				<a-col :span="2"
							 class="front">
					年龄
				</a-col>
				<a-col :span="5"
							 class="front">

				</a-col>
			</a-row>
			<a-row type="flex"
						 justify="center">
				<a-col :span="3"
							 class="front">
					职务
				</a-col>
				<a-col :span="6"
							 class="front">
					xx职务
				</a-col>
				<a-col :span="3"
							 class="front">
					起止时间
				</a-col>
				<a-col :span="7"
							 class="front">
					2021年06月08日 至 2021年06月15日 18：00
				</a-col>
			</a-row>
			<a-row type="flex"
						 justify="center">
				<a-col :span="3"
							 class="front">
					事由
				</a-col>
				<a-col :span="16"
							 class="front">

				</a-col>
			</a-row>
			<a-row type="flex"
						 justify="center">

				<a-col :span="19"
							 style="border:1px solid #aaa;height:200px;">
					<div style="margin:20px">审批意见：<a-radio-group name="radioGroup"
													 :default-value="1">
							<a-radio :value="1">
								拟同意
							</a-radio>
							<a-radio :value="2">
								同意
							</a-radio>
							<a-radio :value="3">
								不同意
							</a-radio>
						</a-radio-group>
					</div>

					<a-textarea style="margin-left:100px;width:70%"
											placeholder=""
											:rows="3" />
					<a-row type="flex"
								 justify="center"
								 style="margin:20px;">
						<a-button type="primary"
											style="margin-right:80px;">
							办理
						</a-button>
						<a-button type="primary">
							返回
						</a-button>
					</a-row>
				</a-col>

			</a-row>

		</div>
	</page-card>
</template>
<script>
import reqwest from 'reqwest'
import { leaveInfoList, leaveInfoDel } from '@/api/leaveinfo'
import {
	PAGINATION,
	TABLE_STATUS_CELL
} from '@zt/zongheng-pro/framework/constants'

export default {
	data() {
		return {
			fileList: [],
			uploading: false
		}
	},
	methods: {
		handleRemove(file) {
			const index = this.fileList.indexOf(file)
			const newFileList = this.fileList.slice()
			newFileList.splice(index, 1)
			this.fileList = newFileList
		},
		beforeUpload(file) {
			this.fileList = [...this.fileList, file]
			return false
		},
		handleUpload() {
			const { fileList } = this
			const formData = new FormData()
			fileList.forEach((file) => {
				formData.append('files[]', file)
			})
			this.uploading = true

			// You can use any AJAX library you like
			reqwest({
				url: 'https://www.mocky.io/v2/5cc8019d300000980a055e76',
				method: 'post',
				processData: false,
				data: formData,
				success: () => {
					this.fileList = []
					this.uploading = false
					this.$message.success('upload successfully.')
				},
				error: () => {
					this.uploading = false
					this.$message.error('upload failed.')
				}
			})
		}
	}
}
</script>
<style>
.front {
	height: 40px;
	display: flex;
	justify-content: center;
	align-items: center;
	border: 1px solid #aaa;
}
.value {
	display: flex;
	align-items: center;
	padding-left: 10px;
	border: 1px solid #aaa;
	height: 40px;
}
</style>